package com.wang.designpattern.facade;

public class HomeTheaterFacade {

    private DVDPlayer dvdPlayer;

    private Popcorn popcorn;

    public HomeTheaterFacade() {
        this.dvdPlayer = DVDPlayer.getInstance();
        this.popcorn = Popcorn.getInstance();
    }

    public void ready() {
        popcorn.on();
        popcorn.pop();
    }

    public void play() {
        dvdPlayer.play();
    }

    public void pause() {
        dvdPlayer.pause();
    }

    public void end() {
        popcorn.off();
        dvdPlayer.off();
    }
}
